home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / palis102.lha / palis / Install_palis
Text File  |  1992-09-02  |  7KB  |  262 lines

  1. ;; STR_VER: Install_palis 1.02 (10.2.1996)
  2. ;;
  3. ;; Install Palis to system
  4. ;; (c)1995-1996 by Codex Design Software
  5.  
  6. ;; ============================================
  7.  
  8. (set @default-dest "C:")
  9. (set @pretend 0)
  10. (set @user-level 2)
  11. (set #docdir "HELP:")
  12.  
  13. (set STATUS_OKAY   0)
  14. (set STATUS_DOUBLE 1)
  15.  
  16. ;; ============================================ HELLO
  17.  
  18. (complete 0)
  19. (welcome "·C·O·D·E·X· ·D·E·S·I·G·N· ·S·O·F·T·W·A·R·E·\n"
  20.          "presents:\n"
  21.          "Palis V1.02\n"
  22.          "welcome to its installation utility\n")
  23.  
  24. (complete 10)
  25.  
  26. ;; ============================================ ALREADY ONE ?
  27.  
  28. (if (exists "C:Palis" (noreq))
  29.     (
  30.        (set @code STATUS_OKAY)
  31.        (set @default-dest "C:")
  32.        (message "\n"
  33.         "Palis has already been found on your machine.\n"
  34.         "\n"
  35.         "It will be updated now.")
  36.     )
  37.     (
  38.        (set @code (run "patchtest/patchtest LIB=patchtest/patchtest.library OFF=-30 QUIET"))
  39.  
  40.        (if (< 5 @code)
  41.            (if (askbool (prompt "Help ! Error while checking whether you already "
  42.                         "have a patch-manager !\n"
  43.                         "Do you have one (Saferpatches, etc.) ?")
  44.                     (help   @askbool-help)
  45.                     (default 0)
  46.               )
  47.               (set @code 0)
  48.               (set @code 5)
  49.           )
  50.        )
  51.        
  52.        (if (= @code 0)
  53.            (if (askbool (prompt "You already have a patch-manager installed.\n"
  54.                     "Do you want to install Palis V1.02, additionally\n"
  55.                     "(it won't be started automatically, then; "
  56.                     "you have to stop starting the other manager "
  57.                     "first) ?")
  58.                 (help   "It's neither neccessary nor wise to use two patch-managers.\n"
  59.                     "If you want to use Palis, you have to stop using "
  60.                     "your old one.\n"
  61.                     "If you are intersted in the sources how to "
  62.                     "patch a library only, simply copy the contence "
  63.                     "of the cdxMakePatches-directory anywhere you want.\n"
  64.                     "\n"
  65.                     @askbool-help)
  66.                 (choices " Yes " " No, thanks ")
  67.                 (default 0)
  68.            )
  69.            (set @code STATUS_DOUBLE)
  70.            (exit "Okay, see you again !" (quiet))
  71.            )
  72.            (set @code STATUS_OKAY)
  73.        )
  74.        
  75.        
  76.        ;; ============================================ COPY WHERE
  77.        
  78.        (complete 20)
  79.        
  80.        (set @default-dest (askdir (prompt "Where do you want to copy Palis"
  81.                           "(path must be valid even from "
  82.                           "s:user-startup !) ?")
  83.                       (help   "Select where to copy Palis.\n"
  84.                              "Since Palis will automatically be "
  85.                              "executed when starting your system "
  86.                              "copy it in a directory which "
  87.                              "is available to your system "
  88.                              "even before the Workbench is up !\n"
  89.                              "\n"
  90.                              @askdir-help)
  91.                       (default @default-dest)
  92.                   )
  93.        )
  94.     )
  95. )
  96. ;; ============================================ WHAT ELSE
  97.  
  98. (complete 30)
  99.  
  100. (set opts (askoptions (prompt "Which additional products do you want ?")
  101.               (help   @askobtions-help)
  102.               (choices "Palis documentation (guide)"
  103.                          "ViewPALIS (see which libraries are patched)"
  104.                    "Source/Object how to patch a library"
  105.                    "Patchtest (find out whether patch-manager exists)")
  106.               (default 3)
  107.       )
  108. )
  109.  
  110. (if (= 1 (BITAND opts 1))
  111.     (
  112.     (set @copyguide TRUE)
  113.     (set @guidedir (askdir (prompt "Where shall I copy the documentation (Palis.guide) ?")
  114.                    (help   @askdir-help)
  115.                    (newpath)
  116.                    (default "HELPDIR:")
  117.             )
  118.     )
  119.     )
  120.     (set @copyguide FALSE)
  121. )
  122.  
  123. (if (= 2 (BITAND opts 2))
  124.     (
  125.     (set @copyview TRUE)
  126.     (set @viewdir (askdir (prompt "Where shall I copy the documentation (Palis.guide) ?")
  127.                    (help   @askdir-help)
  128.                    (newpath)
  129.                    (default "SYS:utilities")
  130.             )
  131.     )
  132.     )
  133.     (set @copyview FALSE)
  134. )
  135.  
  136. (if (= 4 (BITAND opts 4))
  137.     (
  138.     (set @copysrc TRUE)
  139.     )
  140.     (set @copysrc FALSE)
  141. )
  142.  
  143. (if (= 8 (BITAND opts 8))
  144.     (
  145.     (set @copytest TRUE)
  146.     (set @testdir (askdir (prompt "Where shall I copy Testpatch "
  147.                     "(sources, helpfile, etc.) ?")
  148.                    (help   @askdir-help)
  149.                    (newpath)
  150.                    (default "SYS:Testpatch")
  151.             )
  152.     )
  153.     )
  154.     (set @copytest FALSE)
  155. )
  156.  
  157. ;; ============================================ COPY...
  158.  
  159. (complete 50)
  160.  
  161. (copyfiles (prompt "Copying Palis...")
  162.            (help   "Fine, isn't it ;->")
  163.            (dest   @default-dest)
  164.            (source "Palis")
  165.            (optional "nofail" "force")
  166. )
  167.  
  168. (if (= @code STATUS_OKAY)
  169.   (
  170.     (set @command (tackon @default-dest "Palis"))
  171.     (startup "Palis"
  172.              (prompt "\n"
  173.              "I will now edit s:user-startup in order to "
  174.              "make Palis ran when you start your machine.\n"
  175.              "Note that Palis is _not_ active after the "
  176.              "installation... you have to reboot your "
  177.              "computer when the installation is been finished !")
  178.              (help   "You can not start Palis savely now.\n"
  179.                      "Please reset your machine when finished !")
  180.              (command @command)
  181.     )
  182.   )
  183. )
  184.  
  185. (complete 60)
  186.  
  187. (if @copyguide
  188.   (copyfiles (prompt "Copying documentation...")
  189.              (help   "Fine, isn't it ;->")
  190.              (dest   @guidedir)
  191.              (source "doc/Palis.guide")
  192.              (infos)
  193.              (optional "nofail" "force")
  194.   )
  195. )
  196.  
  197. (complete 65)
  198.  
  199. (if @copyguide
  200.   (copyfiles (prompt "Copying ViewPALIS...")
  201.              (help   "Fine, isn't it ;->")
  202.              (dest   @viewdir)
  203.              (source "ViewPALIS")
  204.              (infos)
  205.              (optional "nofail" "force")
  206.   )
  207. )
  208.  
  209. (complete 70)
  210.  
  211. (if @copysrc
  212.   (
  213.     (copyfiles (prompt "Copying include file to INCLUDE:")
  214.              (help   "Fine, isn't it ;->")
  215.              (dest   "INCLUDE:")
  216.              (source "cdxMakePatches/cdxMakePatches.h")
  217.              (optional "nofail" "force")
  218.     )
  219.     (copyfiles (prompt "Copying object file to LIB:")
  220.              (help   "Fine, isn't it ;->")
  221.              (dest   "INCLUDE:")
  222.              (source "cdxMakePatches/cdxMakePatches.o")
  223.              (optional "nofail" "force")
  224.     )
  225.     (makedir "INCLUDE:cdxMakePatches"
  226.              (prompt "Creating INCLUDE:cdxMakePatches/ directory "
  227.                      "in order to copy the source of cdxMakePatches.o "
  228.                      "into it ...")
  229.          (safe)
  230.     )
  231.     (copyfiles (prompt "Copying source file to INCLUDE:cdxMakePatches/")
  232.              (help   "Fine, isn't it ;->")
  233.              (dest   "INCLUDE:cdxMakePatches/")
  234.              (source "cdxMakePatches/cdxMakePatches.c")
  235.              (optional "nofail" "force")
  236.     )
  237.   )
  238. )
  239.  
  240. (complete 80)
  241.  
  242. (if @copytest
  243.     (copyfiles (prompt "Copying Testpatch files...")
  244.                (source "PatchTest/")
  245.                (dest   @testdir)
  246.                (all)
  247.                (infos)
  248.                (optional "askuser" "nofail")
  249.     )
  250. )
  251.  
  252.  
  253. (complete 100)
  254.  
  255. (exit "Thank you for installing\n"
  256.       "a\n"
  257.       "·C·O·D·E·X· ·D·E·S·I·G·N· ·S·O·F·T·W·A·R·E·\n"
  258.       "production !\n\n"
  259.       "Gimme flames:\n"
  260.       "codex@stern.mathematik.hu-berlin.de")
  261.  
  262.